﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Noodles.Core.Repositories;
using Noodles.Core.Model;
using Noodles.Core.Enums;
using NoodlesCms.Configuration.Extensions;
using NoodlesCms.Areas;
using NoodlesCms.Configuration;

namespace NoodlesCms.Controllers
{
    public class HomeController : Controller
    {
        public INoodlesRepository noodlesRepo { get; set; }
        public ActionResult Index()
        {
            var blogs = noodlesRepo.GetPagedBlog("Home",1,5);
            return View(blogs);
        }
        public ActionResult BlogList(int page)
        {
            var blogs = noodlesRepo.GetPagedBlog("Home", page, 5);
            return PartialView(blogs);
        }
        public ActionResult About()
        {
            return View();
        }
        [SEOToId]
        public ActionResult Details(int id,String Title)
        {
            var slug = RouteData.Values["slug"] as string;
            ViewData["slug"] = slug;
            ViewData["id"] = 0;
            return View();
        }


    }
}
